package com.lovar.gaming.api.controller;

import com.lovar.gaming.core.domain.R;
import com.lovar.gaming.dao.domain.SysMenuRole;
import com.lovar.gaming.service.SysMenuRoleService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 穹龙
 * @description 针对表【sys_menu_role(菜单角色表)】的数据库操作Controller
 * @createDate 2024-08-06 17:09:56
*/
@RestController
@RequestMapping("/sysMenuRole")
@RequiredArgsConstructor
public class SysMenuRoleController {
    private SysMenuRoleService sysMenuRoleService;

    /**
     * 根据Id获取菜单角色表详情
     *
     * @param query 查询参数
     * @return SysMenuRole
    */
    @PostMapping("/queryById")
    public R<SysMenuRole> queryById(@RequestBody SysMenuRole query) {
        return R.ok(sysMenuRoleService.queryById(query.getId()));
    }
}
